module Main where
import Data.List
data Person = Person {
	name :: String,
	age :: Int
} deriving Show

median :: [Double] -> Double
median [] = 0
median xs = if oddInLength then
	       middleValue
	    else
               (middleValue+beforeMiddleValue)/2
 where
  sortedList= sort xs
  oddInLength=1 == mod (genericLength xs) 2
  middle = floor & (genericLength xs) / 2




